const mysql = require('mysql')
const db = mysql.createPool({
    host:'127.0.0.1',
    user:'root',
    password:'',
    database:'123'
})
// db.query('select 1',(err,results)=>{
//     if(err) return console.log(err.message)
//     console.log(results)
// })

//查询
db.query('select * from users',(err,results)=>{
    if(err) return console.log(err.message)
    console.log(results)
})